"""
@File    : sane_case.py
@Author  : timo.tan
@Time    : 2025/07/29 11:24 
"""

import requests

def get_auth_token() -> str:
    """获取认证Token，后续可以改为从配置文件或环境变量获取"""
    return "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEzMjk4LCJpc3MiOiJjZ2Jvc3MiLCJleHAiOjE3NTYyNjIxMTIsIm5iZiI6MTc1MzY3MDExMiwiaWF0IjoxNzUzNjcwMTEyfQ.ifaIeAEp6SWTZTbQ2iZxPJrVVcn-MuI9C5E9zbGmLsk"


def get_sane_data():
    url = 'https://cgboss.yuntiancloud.com/api/cgboss/v1/task/plist'
    headers = {'Authorization': get_auth_token()}
    data = {"page":{"no":1,"size":100},"pstatus":-1}
    response = requests.post(url=url, headers=headers, json=data, timeout=30)
    return response.json()

if __name__ == '__main__':
    print(get_sane_data())

